Skip to main content
Follow along this tutorial by running this Colab Notebook.

Setting Up

Verify the installation

Download & Extract Dataset

We downloaded a few random TikTok videos for the purpose of this demonstration. Feel free to use your own video dataset. Let’s download the TikTok videos into our local folder.

From Videos to Images

fastdup works on images. We must first extract frames from the videos using a one-liner fastdup utility function.
This should create aframes/folder which stores all the frames extracted from the videos.

Run fastdup

Now that we have the frames of images, let’s run fastdup and analyze the frames.

Components Gallery

We can visualize the cluster of similar detections using the components gallery view. Specify draw_bbox=True to see the detection bounding box on the original image.

Similarity Gallery

Using the similarity_gallery view, we can find similar looking faces (bounding boxes) across all the extracted frames.

Duplicates Gallery

With the duplicates_gallery view, visualize duplicate image pairs across videos.

Outliers Gallery

Using the outliers_gallery we can also visualize faces (detections) that looks visually different from others.

Stats Gallery

You can visualize the faces using various metrics using the stats_gallery.

Dark Objects

Specifying metric='dark' sorts the detections in an ascending order of image mean value.

Bright Objects

Conversely, specifying metric='bright'sorts the detections in descending order of image mean value.

Blurry Objects

Finally, specifying metric='blur'ranks the images in ascending ‘blurriness’.